JBoss Community Archive (Read Only)

RHQ

JSF JON 2.4 (Resource) > Summary > Overview to a GWT/SmartGWT equivalent (Resource) > Summary > Activity tab

In trying to convert the JSF JON 2.4 (Resource) > Summary > Overview to a GWT/SmartGWT equivalent (Resource) > Sumamry > Activity tab, the migration of the Sparkline images has proved to be non-trivial.

Sparklines are condensed data displays(mini graphs) of the recent runtime information for a given resource. In ajax applications, the generation of the graphics/images can occur on

  1. server side: data pulled on request and temporary image drawn and sent back to the client. Think 2D graphics and image snapshot(JSF component), with client side code just swapping in the new image.

  2. client side: data pulled on request but client side javascript libraries renders the graph content.

The former is server intensive and restricted to hard coded imaging style/look and feel of 2D imaging used when library was written(See JON 2.4). While the latter scales better by offloading graph generation to client browser it is also significantly more flexible as one can swap in one of several third party javascript libraries that have evolved for this very purpose(Ex. http://omnipotent.net/jquery.sparkline/).

The client side approach is better for being able to deliver modern and appealing UIs. I've spent several hours trying to integrate the jquery.sparkline libraries into our coreGui implementation without success. In a standalone application the usage and setup is trivial and quick. The difficulty seems to be that the SmartGWT/GWT framework does not easily play well with external javascript libraries. I'm able to load the libraries fine but the inline elements are never updated correctly.

Shelving this task until a javascript graphing solution is decided upon

Current work will be saved in the modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/summary/ActivityView2.java.
Embedding third party javascript libraries in SmartGWT appears non-trivial as well as one must rely upon the JSNI integration(hand coding javascript) which is quite error prone.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:45:04 UTC, last content change 2011-01-03 13:48:37 UTC.